Perron's Formula

Muhammad Haris Rao


Here, we aim to prove the following theorem which related the partial sums of an arithmeetic function to its associated Dirichlet series

Theorem (Perron's Formula): Let $f : \mathbb{Z}_{> 0} \longrightarrow \mathbb{C}$ be an arithmetic function with abscissa of absolute convergence $\sigma_f^a$. Then for any $c > \text{max}\{0, \sigma_f\}$, it holds that \begin{align*} \sum_{n \le x}{}^{'} f(n) &= \lim_{T \to \infty} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{x^s}{s} \sum_{n = 1}^\infty \frac{f(n)}{n^s} \, ds \end{align*} where the sum only counts half of the last summand when $x$ is an integer.

For this, we require the following integral:

Proposition: For any reals $u, c \in \mathbb{R}_{> 0}$, we have \begin{align*} \frac{1}{2 \pi i} \int_{c - i \infty}^{c + i \infty} \frac{u^s}{s} \, ds &= \begin{cases} 1 + \mathcal{O} \left( \frac{u^c}{T \log{u}} \right) &\text{ , if $u > 1$} \\ \frac{1}{\pi} \arctan{\left( \frac{T}{c} \right)} &\text{ , if $u = 1$} \\ \mathcal{O} \left( \frac{u^c}{T \log{(1/u)}} \right) &\text{ , if $0 < u < 1$} \end{cases} \end{align*}

Proof. First, we deal with the case where $u \ge 1$. Fix for now $T > 0$, and let $R > 0$. We have by Cauchy's residue theorem \begin{align*} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{u^s}{s} \, ds &= \underset{s = 0}{\text{Residue}} \left\{ \frac{u^s}{s} \right\} + \int_{c - iT}^{-R - iT} \frac{u^s}{s} \, ds + \int_{- R - iT}^{-R + iT} \frac{u^s}{s} \, ds + \int_{-R + iT}^{c + iT} \frac{u^s}{s} \, ds \\ &= 1 + \int_{c - iT}^{-R - iT} \frac{u^s}{s} \, ds + \int_{- R - iT}^{-R + iT} \frac{u^s}{s} \, ds + \int_{-R + iT}^{c + iT} \frac{u^s}{s} \, ds \end{align*} We will take $R \to \infty$ and see that the contour from $-R - iT$ to $-R + iT$ vanishes: \begin{align*} \left| \int_{- R - iT}^{-R + iT} \frac{u^s}{s} \, ds \right| = \left| \int_{-T}^T \frac{u^{-R + it}}{-R + it} i \, dt \right| \le \frac{2T u^{-R}}{R} \longrightarrow 0 \text{ as $R \to \infty$} \end{align*} So now we have \begin{align*} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{u^s}{s} \, ds &= 1 + \frac{1}{2 \pi i} \int_{c - iT}^{-\infty - iT} \frac{u^s}{s} \, ds + \frac{1}{2 \pi i} \int_{-\infty + iT}^{c + iT} \frac{u^s}{s} \, ds \end{align*} The two integrals on the right are bounded as \begin{align*} \left| \int_{c - iT}^{-\infty - iT} \frac{u^s}{s} \, ds + \int_{-\infty + iT}^{c + iT} \frac{u^s}{s} \, ds \right| &\le \left| \int_{c - iT}^{-\infty - iT} \frac{u^s}{s} \, ds \right| +\left| \int_{-\infty + iT}^{c + iT} \frac{u^s}{s} \, ds \right| \\ &= \left| \int_{-\infty}^c \frac{u^{t - iT}}{t - iT} \, ds \right| + \left| \int_{-\infty}^c \frac{u^{t + iT}}{t + iT} \, ds \right| \\ &\le \int_{-\infty}^c \frac{u^t}{\sqrt{t^2 + T^2}} \, dt + \int_{-\infty}^c \frac{u^t}{\sqrt{t^2 + T^2}} \, dt \\ &\le \frac{2}{T} \int_{-\infty}^c e^{t \log{u}} \, dt \\ &= \frac{2u^c}{T \log{u}} \end{align*} This means that if $u > 1$ then \begin{align*} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{u^s}{s} \, ds &= 1 + \mathcal{O} \left( \frac{u^c}{T \log{u}} \right) \end{align*}

Now, suppose $0 < u < 1$. This time, let $R > c$ so we have by Cauchy's theorem \begin{align*} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{u^s}{s} \, ds &= \frac{1}{2 \pi i} \int_{c - iT}^{R - iT} \frac{u^s}{s} \, ds + \int_{R - iT}^{R + iT} \frac{u^s}{s} \, ds + \int_{R + iT}^{c + iT} \frac{u^s}{s} \, ds \end{align*} The integral from $R - iT$ to $R + iT$ vanishes as $R \to \infty$: \begin{align*} \left| \int_{R - iT}^{R + iT} \frac{u^s}{s} \, ds \right| \le \int_{-T}^T \frac{\left| u^{R + it} \right|}{\sqrt{R^2 + t^2}} \, dt \le \frac{2T u^R}{R} \longrightarrow 0 \text{ as $R \to \infty$} \end{align*} since $0 < u < 1$. So now we have the equality \begin{align*} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{u^s}{s} \, ds &= \frac{1}{2 \pi i} \int_{c - iT}^{\infty - iT} \frac{u^s}{s} \, ds + \frac{1}{2 \pi i} \int_{\infty + iT}^{c + iT} \frac{u^s}{s} \, ds \end{align*} This is \begin{align*} \left| \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{u^s}{s} \, ds \right| &\le \left| \frac{1}{2 \pi i} \int_{c - iT}^{\infty - iT} \frac{u^s}{s} \, ds \right| + \left| \int_{\infty + iT}^{c + iT} \frac{u^s}{s} \, ds \right| \\ &\le \frac{1}{2 \pi} \left( \int_c^\infty \frac{\left| u^{t - iT} \right|}{|t - iT|} \, dt + \int_c^\infty \frac{\left| u^{t + iT} \right|}{|t + iT|} \, dt \right) \\ &\le \frac{1}{\pi T} \int_c^\infty u^t \, dt \\ &= \frac{u^c}{2 \pi T \log{\left( 1/u \right) }} \\ \end{align*} which completes the case $0 < u < 1$.

The $u = 1$ is an explicit computation: \begin{align*} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{1}{s} \, ds &= \frac{1}{2 \pi i} \int_{-T}^T \frac{i}{c + it} \, dt \\ &= \frac{1}{2 \pi} \int_{-T}^T \frac{c}{c^2 + t^2} \, dt - \frac{1}{2 \pi} \int_{-T}^T \frac{i t}{c^2 + t^2} \, dt \\ &= \frac{1}{2 \pi c^2} \int_{-T}^T \frac{c}{1 + (t/c)^2} \, dt \\ &= \frac{1}{2 \pi c^2} \int_{-T/c}^{T/c} \frac{c^2}{1 + t^2} \, dt \\ &= \frac{1}{\pi} \arctan{\left( \frac{T}{c} \right)} \end{align*} where the second integral vanished because its integrand is odd and the region of integration is symmetric. This was the last remaining case. We have shown \begin{align*} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{u^s}{s} \, ds &= \begin{cases} 1 + \mathcal{O} \left( \frac{u^c}{T \log{u}} \right) &\text{ , if $u > 1$} \\ \frac{1}{\pi} \arctan{\left( \frac{T}{c} \right)} &\text{ , if $u = 1$} \\ \mathcal{O} \left( \frac{u^c}{T \log{(1/u)}} \right) &\text{ , if $0 < u < 1$} \end{cases} \end{align*} as was claimed.

This result implies that for $x > 0$ and $n \in \mathbb{Z}_{> 0}$, \begin{align*} \frac{1}{2 \pi i} \int_{c - i \infty}^{c + i \infty} \frac{(x/n)^s}{s} \, ds &= \begin{cases} 1 &\text{ , if $n < x$} \\ 1/2 &\text{ , if $n = x$} \\ 0 &\text{ , if $n > x$} \end{cases} \end{align*} for any $c > 0$ where the integrals are in the principal value sense. Hence, \begin{align*} \sum_{n \le x}{}^{'} f(n) &= \sum_{n = 1}^\infty \frac{f(n)}{2 \pi i} \int_{c - i \infty}^{c + i \infty} \frac{(x/n)^s}{s} \, ds \end{align*} If we move the summation into the integral, Perron's formula comes out. We will now justify this rigorously.

Proof of Perron's Formula. Recall that in the hypothesis of the statement, we require not only that $c > 0$ but also that $c > \sigma_f^a$. This allows us to say that \begin{align*} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{x^s}{s} \sum_{n = 1}^\infty \frac{f(n)}{n^s} \, ds = \sum_{n = 1}^\infty \frac{f(n)}{2 \pi i} \int_{c - iT}^{c + iT} \frac{(x/n)^s}{s} \, ds \end{align*} This is because the Dirichlet series converges uniformly on any compact subset of its half plane of convergence, so we can pass the limit through the integral. Now we have to take $T \to \infty$. If $n > x$, then \begin{align*} \left| \sum_{n > x} \frac{f(n)}{2 \pi i} \int_{c - iT}^{c + iT} \frac{(x/n)^s}{s} \, ds \right| &\le \sum_{n > x} \left| f(n) \right| \left| \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{(x/n)^s}{s} \, ds \right| \\ &\le \sum_{n > x} \left| f(n) \right| \left( \frac{(x/n)^c}{2 \pi T \log{(n/x)}} \right) \\ &\le \frac{x^c}{2 \pi T \log{ \left( \frac{\lfloor x \rfloor + 1}{x} \right) }} \sum_{n > x} \frac{|f(n)|}{n^c} \end{align*} which is a finite number tending to 0 as $T \to \infty$ since the Dirichlet series converges absolutely at $c$. Hence, \begin{align*} \lim_{T \to \infty} \sum_{n > x} \frac{f(n)}{2 \pi i} \int_{c - iT}^{c + iT} \frac{(x/n)^s}{s} \, ds = 0 \end{align*} Using this gives us \begin{align*} \lim_{T \to \infty} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{x^s}{s} \sum_{n = 1}^\infty \frac{f(n)}{n^s} \, ds &= \lim_{T \to \infty} \sum_{n = 1}^\infty \frac{f(n)}{2 \pi i} \int_{c - iT}^{c + iT} \frac{(x/n)^s}{s} \, ds \\ &= \sum_{n \le x} \lim_{T \to \infty} \frac{f(n)}{2 \pi i} \int_{c - iT}^{c + iT} \frac{(x/n)^s}{s} \, dt + \lim_{T \to \infty} \sum_{n > x} \frac{1}{2 \pi i} \int_{c - iT}^{c + iT} \frac{(x/n)^s}{s} \, dt \\ &= \sum_{n \le x} \lim_{T \to \infty} \frac{f(n)}{2 \pi i} \int_{c - iT}^{c + iT} \frac{(x/n)^s}{s} \, dt \\ &= \sum_{n \le x}{}^{'} f(n) \end{align*} which completes the proof.